package cn.webrx.controller;

import cn.webrx.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>功能描述: </p>
 *
 * @author webrx
 * @version 1.0
 * @date 2020-05-23 17:40
 */
@Controller
public class IndexController {
    @Autowired
    private BookMapper bookmapper;
    @RequestMapping("/")
    public String index(Model m) {
        m.addAttribute("msg","中文信息");
        System.out.println(bookmapper.queryAll());

        m.addAttribute("list",bookmapper.queryAll());
        return "index";
    }
}
